package com.oujia.cloud.cloudcommon.constant;

public enum AudioVersionEnum {
    VERESION_CH(1, "ch"), //中文
    VERESION_EG(2, "eg"), //英文
    VERESION_K(3, "k"); //k版


    private Integer state;
    private String stateDesc;

    AudioVersionEnum(Integer state, String stateDesc) {
        this.state = state;
        this.stateDesc = stateDesc;
    }

    public static AudioVersionEnum contains(int state) {
        for (AudioVersionEnum audioVersion : AudioVersionEnum.values()) {
            if (audioVersion.state == state) {
                return audioVersion;
            }
        }
        return null;
    }


    public static AudioVersionEnum contains(String stateDesc) {
        for (AudioVersionEnum audioVersion : AudioVersionEnum.values()) {
            if (audioVersion.stateDesc.equalsIgnoreCase(stateDesc)) {
                return audioVersion;
            }
        }
        return null;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public String getStateDesc() {
        return stateDesc;
    }

    public void setStateDesc(String stateDesc) {
        this.stateDesc = stateDesc;
    }
}
